# 返回值
def func(a,b):
    print(a+b)

r1 = func(1,2)
print(r1)

print('----------')
def func2(a,b):
    return a + b

r2 = func2(1,2)
print('返回值是：',r2)

print('='*50)
#多返回值

def get_num(num):
    s=0
    odd_sum = 0
    even_sum = 0
    for i in range(1,num+1):
        if i%2 == 0:
            odd_sum+=i
        else:
            even_sum+=i
        s+=i
    return odd_sum,even_sum,s #三个返回值

sum = get_num(10)
print(type(sum))
print(sum)

# 解包
a,b,c = get_num(10)
print(a)
print(b)
print(c)
